fruits = ["apple", "orange", "banana", "peach", "cherry"]

print("="*8 + "for使用元素" + "="*8)

for x in fruits:
    print(x)

print("="*8 + "for使用下标" + "="*8)

for i in range(5): # 5 -> len(fruits)
    print(f"{i}" + ":" + fruits[i])

print("="*8 + "while使用下标" + "="*8)
k = 0
while k < 5: # 5 -> len(fruits)
    print(f"{k}" + ":" + fruits[k])
    k+=1